<!--
 * @Author: caozaihui
 * @Date: 2024-06-21 09:36:08
 * @LastEditors: czh 2119294696@qq.com
 * @LastEditTime: 2024-06-29 23:43:10
 * @FilePath: \YMU_forum_vue\src\components\article\ArticleCardMini.vue
-->
<!-- 左边的文章卡片 -->
<script setup>
import { useRouter } from 'vue-router';

import { defineProps } from 'vue';
const props = defineProps({
    articleList: {
        type: Array,
        default: () => []
    }
});

const router = useRouter();
const jumpArticlePage = (aid) => {
    router.push({
        path: '/article/auart',
        query: {
            aid: aid
        }
    })
}


</script>

<template>
    <div class="box-card" v-for="article in articleList" @click="jumpArticlePage(article.aid)">
        <el-text class="title">{{ article.title }}</el-text>
        <div>
            <el-text>{{ article.createTime }}</el-text>
        </div>
    </div>
</template>


<style scoped>
.title {
    font-size: 14px;
    font-weight: bolder;
    margin-bottom: 10px;
    color: #3966d7;
    margin-right: 5px;
}

.box-card {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
    display: flex;
}
</style>